import 'package:flutter/material.dart';

main() =>
    runApp(MaterialApp(debugShowCheckedModeBanner: false, home: HomePage()));

class HomePage extends StatefulWidget {
  @override
  createState() => _HomePageState();
}

class _HomePageState extends State<HomePage> {
  @override
  build(context) => Scaffold(
        backgroundColor: Colors.black12,
        body: ListView(
          children: [
            CurveImage(),
          ],
        ),
      );
}

class CurveImage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return ClipPath(
      child: Image.network(
          'https://bmob-cdn-25944.b0.upaiyun.com/2019/05/29/41994ba04060171180829addb2032f03.jpg'),
      clipper: BottomCurveClipper(),
    );
  }
}

class BottomCurveClipper extends CustomClipper<Path> {
  @override
  getClip(size) {
    var path = Path();
    path.lineTo(0.0, size.height);
    var start = Offset(size.width / 2, size.height - 38.0);
    var end = Offset(size.width, size.height);
    path.quadraticBezierTo(start.dx, start.dy, end.dx, end.dy);
    path.lineTo(size.width, size.height);
    path.lineTo(size.width, 0.0);
    path.close();
    return path;
  }

  @override
  shouldReclip(oldClipper) => false;
}
